﻿using System.Runtime.InteropServices;
using Entity;
using EntityCor;
using EntityCor.DapperExtensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BLL
{
    public class tb_userBll:BaseBll
    {
        public tb_userBll(){
           
        }
        public List<tb_user> GeTbUsers()
        {
            IList<IPredicate> predList = new List<IPredicate>();
            predList.Add(Predicates.Field<tb_user>(p => p.tb_userAge, Operator.Ge, 26));
            predList.Add(Predicates.Field<tb_user>(p => p.tb_userName, Operator.Like, "yi%"));
            var predicateGroup = Predicates.Group(GroupOperator.And, predList.ToArray());
            var userList = repositoryBase.GetList<tb_user>(predicateGroup, null, false);
            return userList.ToList();
        }
    }
}
